package com.timothy.business.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.timothy.dao.entity.IdeaUser;
import com.timothy.dao.service.IIdeaUserService;

@Service
public class UserDaoService {

	@Autowired
	private IIdeaUserService userService;

	/**
	 * 根据用户手机号获取用户信息
	 * @param phone
	 * @return
	 */
	public IdeaUser getUserByPhone(String phone) {
		Wrapper<IdeaUser> wrapper = new EntityWrapper<IdeaUser>().eq(IdeaUser.PHONENUM, phone);
		return userService.selectOne(wrapper);
	}

}
